<?php
if(!defined('IN_DISCUZ')) {
	exit('Access Denied');
}
include "safe.class.php";
$safe = new safe_weitao_plugin_online_alipay();
if(empty($_G['uid'])) {
	showmessage("您还没有登陆，请先登陆","member.php?mod=logging&action=login");
}
$clickhref = $_G['cache']['plugin']['online_alipay']['clickhref'];
$allowgroup = $_G['cache']['plugin']['online_alipay']['allowgroup'];
$thread_guarantee = DB::table("thread_guarantee");
$do = $safe->getparameter('do',1,0);
if(empty($do)) {
	$do = 'default';
}
$query = DB::query("SELECT * FROM `$thread_guarantee` WHERE `buyername` = '".$_G['username']."' OR `sellername`='".$_G['username']."'");
while($list = mysql_fetch_array($query)) {
if($do == 'doing') {
      if($list[10] >= 4) {
            continue;
      }
} else if($do == 'end') {
      if($list[10] < 4) {
            continue;
      }
}
        $orderlist[$list[0]] = array(
                'tid' => $list[1],
                'sellername' => $list[2],
                'buyerrname' => $list[3],
                'qq' => $list[4],
                'phone' => $list[5],
                'post' => $list[6],
                'price' => $list[7],
                'status' => $list[10],
         );
}
include template('online_alipay:index');
?>